<?php include show_tpl('public_uheader.htm'); ?>

<div style="width:100%; height:20px; background:#E9ECF3;"></div>

<?php include show_tpl('public_usider.htm'); ?>

<div id="page-wrapper" class="gray-bg">

	<div class="row wrapper wrapper-content">
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="panel-title">
							<em class="fa fa-list"></em>
                             商户管理&nbsp;&nbsp;
						</div>
                    </div>
					<div class="panel-body">
						<form method="get" class="form-inline m-b-xs" action="<?php echo url('user-manage');?>">
							<div class="form-group">
								<select name="column" class="form-control">
									<option value="all">全部</option>
									<option value="username" <?php if($column=='username'){echo 'selected';} ?>>用户名</option>
									<option value="email" <?php if($column=='email'){echo 'selected';} ?>>邮箱</option>
								</select>
							</div>&nbsp;&nbsp;
							<div class="form-group">
								<input type="text" class="form-control" name="keyword" placeholder="关键字" value="<?php echo $keyword?>" size="15">
							</div>&nbsp;&nbsp;
							<button type="submit" class="btn btn-primary">
								<i class="fa fa-search"></i>
								&nbsp;立即查询
							</button>
							<button class="btn btn-success" onclick="window.location.href='<?php echo url('user-add');?>';return false;">
								<i class="fa fa-plus"></i>
								&nbsp;添加商户
							</button>
						</form>
						<div class="table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>用户名</th>
                                      	<th>余额</th>
                                      	<th>费率</th>
                                      	<th>状态</th>
										<th>总流水</th>
										<th>登录时间</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach($userlist as $u){ ?>
									<tr>
										<!--<a href="<?php echo url('user-manage-'.$u['uid']);?>">编辑</a>-->
										<td class="text-center"><?php echo $u['username'];?></td>
                                        <td class="text-center"><?php echo round($u['coin'],3);?> 元</td>
                                        <td class="text-center"><?php echo $u['rate'];?> </td>
                                      	<td class="text-center"><?php echo $u['is_open']==1 ? '<span style="color:#27ae60">已通过</span>' : '<span style="color:#ea413c;">未审核</span>';?></td>
										<td class="text-center"><?php echo round($u['tj_pay'],2);?></td>
										<td class="text-center"><?php echo date('Y-m-d',$u['login_time']);?></td>
									</tr>
									<?php } ?>
								</tbody>
							</table>
						</div>
						<ul class="text-center"><?php echo $pagination; ?></ul>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<?php include show_tpl('public_ufooter.htm'); ?>